<?php
// Properties to connect db and returns connection
function getConnection()
{
$hostName = 'localhost:3306';
$database = 'weatherDB';
$user = 'root';
$pwd = '';

$dbConn = mysql_connect($hostName, $user, $pwd) or die ('Failed to connect DB Server');
mysql_select_db($database);
return  $dbConn;
}

function closeConnection($conn)
{
try
{
 mysql_close($conn);
}catch(Exception $e)
{}

}

?>

